<?php

namespace app\controllers;

use Yii;
use yii\filters\AccessControl;
use yii\web\Controller;
use yii\filters\VerbFilter;
use app\models\LoginForm;
use app\models\ContactForm;

use app\services\OperateLogService as Log;

class OperateLogController extends AuthController
{
    public $currentHeader = 'header-operation';
    public $currentNav = 'operate-log-nav';
    public $pageTitle = '';

    public function init() {
        parent::init();
    }

    public function actionLogList() {
        $this->pageTitle = $this->t('log', 'Log List');
        return $this->show();
    }

    public function actionGetLogs() {
        $log = $this->service->getLogs();
        $this->jsonReturn(['data' => $log]);
    }
}// end
